package com.snap.vseries.ui;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;

import com.snap.vseries.R;
import com.snap.vseries.base.BaseActivity;
import com.snap.vseries.manager.ConfigManager;
import com.snap.vseries.utils.RootShellCmd;


public class SplashActivity extends BaseActivity {
    private final int DELAY_TIME = 2000;

    @Override
    protected int layoutResId() {
        return R.layout.activity_splash;
    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initData();
        ConfigManager.getInstance().init();
    }

    @Override
    protected void onResume() {
        super.onResume();
        RootShellCmd.getInstance().hideNavigation();
//        sendBroadcast(new Intent("com.tchip.changeBarHideStatus"));

    }

    private void initData() {
        findViewById(R.id.bg).postDelayed(() -> {
            SplashActivity.this.startActivity(new Intent(activity, HomeActivity.class));
            SplashActivity.this.finish();
        }, DELAY_TIME);
    }

}
